package com.hy.erp.inventory.pojo;

import java.io.Serializable ;

import javax.persistence.Column ;
import javax.persistence.Entity;
import javax.persistence.FetchType ;
import javax.persistence.Id ;
import javax.persistence.ManyToOne ;
import javax.persistence.MappedSuperclass ;
import javax.persistence.Table;

import org.hibernate.annotations.Index ;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import com.hy.erp.inventory.dao.interfaces.IRoleDao;
import com.hy.erp.inventory.pojo.interfaces.IRole;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;

/**
 * 
 * <ul>
 * <li>开发作者：汤莉</li>
 * <li>设计日期：2010-10-5；时间：下午03:33:11</li>
 * <li>类型名称：Role</li>
 * <li>设计目的：角色</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
/*@Entity
@Name("role")
@Scope(ScopeType.SESSION)
@Table(name="roles")
@DaoA(IRoleDao.class)*/
//@MappedSuperclass  
public class Role extends AbstractPersistentEntity	implements		IRole
{
	private static final long	serialVersionUID	=
														3447499459461375642L ;

	/**
	 * 构造函数
	 */
	public Role(){}

	@Column(name="rolename",unique=false,nullable=false,insertable=true,updatable=true)
	@Index(name="roleNameIndex")
	public String getRolename ( )
	{
		return this.get(IRole.ROLENAME) ;
	}

	public void setRolename (
								String rolename )
	{
		super.set(IRole.ROLENAME, rolename);
	}


	@ManyToOne(targetEntity=RoleType.class,fetch=FetchType.LAZY)
	public RoleType getRoletype ( )
	{
		return this.get(IRole.ROLETYPE) ;
	}

	public void setRoletype (
								RoleType roletype )
	{
		super.set(IRole.ROLETYPE, roletype);
	}
	
	
	
	
}
